home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14780 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.mindspring.com!usenet
  2. From: wdnick@mindspring.com (William "Doug" Nicholson)
  3. Newsgroups: comp.lang.c++
  4. Subject: Stopping a program with a password or ESC???
  5. Date: Tue, 02 Apr 1996 03:18:39 GMT
  6. Organization: MindSpring Enterprises
  7. Message-ID: <4jprhm$uca@mule1.mindspring.com>
  8. Reply-To: wdnick@mindspring.com
  9. NNTP-Posting-Host: wdnick.mindspring.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. I've written a program that controls a linear motion table and several
  13. input and output devices.  However, there's no way of exiting it
  14. without CTL-ALT-DEL ing out of it.  How can I make it so that when I
  15. press ESC at any point in the program it will exit??  This would be
  16. great for starters.  However, in the future I might want to make it so
  17. that a specific sequence of key presses exits the program.  But the
  18. catch is that I wouldn't want the program to halt as each key was
  19. pressed.  For instance, a person would have to type "end" all at once
  20. without significant pauses for the program to exit, otherwise it would
  21. keep running like normal.
  22.  
  23. Any ideas??  Primarily on my first question, once I get the ESC
  24. figured out I'll worry about the 'password' bit.
  25.  
  26. Thanks in advance.
  27.  
  28.  
  29. Doug Nicholson                                     wdnick@mindspring.com 
  30. Mechanical Engineering Student       
  31. Southern College of Technology            "It is what you make it."
  32. http://www.mindspring.com/~wdnick/resume.html
  33.  
  34.